package cn.h8k.hj212.constant;

/**
 * HJ212协议常量类
 * 集中管理协议相关的所有硬编码字符串
 */
public final class Hj212Constants {
    
    // 协议结构常量
    public static final String HEAD = "##";
    public static final String LENGTH = "LENGTH";
    public static final String CRC = "CRC";
    public static final String DATA = "DATA";
    
    // 数据字段常量
    public static final String QN = "QN";
    public static final String ST = "ST";
    public static final String CN = "CN";
    public static final String PW = "PW";
    public static final String MN = "MN";
    public static final String FLAG = "Flag";
    public static final String CP = "CP";
    
    // 分隔符常量
    public static final String FIELD_SEPARATOR = ";";
    public static final String GROUP_SEPARATOR = "&&";
    public static final String ITEM_SEPARATOR = ",";
    public static final String KEY_VALUE_SEPARATOR = "=";
    public static final String LINE_ENDING = "\r\n";
    
    // 编码格式常量
    public static final String LENGTH_FORMAT = "%04d";
    public static final String TIMESTAMP_FORMAT = "yyyyMMddHHmmss";
    public static final String MILLISECOND_FORMAT = "%03d";
    
    // 错误消息常量
    public static final String ERROR_LENGTH_VALIDATION = "数据长度验证未通过";
    public static final String ERROR_CRC_VALIDATION = "CRC校验未通过";
    
    // 数值类型标识
    public static final String DECIMAL_POINT = ".";
    
    private Hj212Constants() {
        // 防止实例化
    }
} 